package com.micromap.dataprocessing.service

import org.springframework.data.domain.Example

/**
 * @author LiMeng 2017/11/18
 */
interface BaseService<T> {
    abstract fun findAll(): List<T>

    abstract fun findAll(example: Example<T>): List<T>

    abstract fun save(record: T): T

    abstract fun findOne(id: Long?): T

    abstract fun exists(id: Long?): Boolean

    abstract fun delete(id: Long?)

    abstract fun delete(record: T)

    abstract fun delete(ids: List<Long>)

    abstract fun save(records: List<T>): List<T>
}